﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Fundamental.DynamicType
{
    internal class DynamicPrimitive
    {
        public void Launch()
        {
            dynamic number = 5;
            dynamic result = Plus(number);
            Console.WriteLine(result);

            dynamic text = "ABC";
            result = Plus(text);
            Console.WriteLine(result);

            List<dynamic> list = new List<dynamic>();
            list.Add(5);
            list.Add("ABC");
            Console.WriteLine(list.ToString());
        }

        private dynamic Plus(dynamic arg)
        {
            return arg + arg;
        }
    }
}
